package no.uib.hplims.models.peptideinformation;

import javax.persistence.Entity;

import org.vaadin.appfoundation.persistence.data.AbstractPojo;

@Entity
public class Transition extends AbstractPojo {

	private static final long serialVersionUID = 5754173199200742298L;
	
	public final static String WORKING = "Yes";
	public final static String NOT_WORKING = "No";
	
	private double q1;
	private double q3;
	private Ion ion;
	private int fragmentIon;
	private double declusteringPotential;
	private double exitPotential;
	private double collissionEnergy;
	private double collissionExitPotential;
	private double mass;
	private String  working;
	private int rank;
	
	public Transition() {
		exitPotential = 10;
		working = "";
	}

	public double getQ1() {
		return q1;
	}

	public void setQ1(double q1) {
		this.q1 = q1;
	}

	public double getQ3() {
		return q3;
	}

	public Ion getIon() {
		return ion;
	}

	public int getFragmentIon() {
		return fragmentIon;
	}

	public void setFragmentIon(int fragmentIon) {
		this.fragmentIon = fragmentIon;
	}

	public void setIon(Ion ion) {
		this.ion = ion;
	}

	public void setQ3(double q3) {
		this.q3 = q3;
	}

	public double getMass() {
		return mass;
	}

	public void setMass(double mass) {
		this.mass = mass;
	}

	public String getWorking() {
		return working;
	}

	public void setWorking(String working) {
		this.working = working;
	}

	public int getRank() {
		return rank;
	}

	public void setRank(int rank) {
		this.rank = rank;
	}

	public double getDeclusteringPotential() {
		return declusteringPotential;
	}

	public void setDeclusteringPotential(double declusteringPotential) {
		this.declusteringPotential = declusteringPotential;
	}

	public double getExitPotential() {
		return exitPotential;
	}

	public void setExitPotential(double exitPotential) {
		this.exitPotential = exitPotential;
	}

	public double getCollissionEnergy() {
		return collissionEnergy;
	}

	public void setCollissionEnergy(double collissionEnergy) {
		this.collissionEnergy = collissionEnergy;
	}

	public double getCollissionExitPotential() {
		return collissionExitPotential;
	}

	public void setCollissionExitPotential(double collissionExitPotential) {
		this.collissionExitPotential = collissionExitPotential;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		
		Transition that = (Transition) obj;
		
		if (!this.id.equals(that.id))
			return false;
		return true;
	}
	
	
	
}
